package com.blqy.fr.model.user;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.blqy.fr.model.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 用户实体类
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "User")
@TableName("user")
public class User extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "用户名")
    @TableField("user_name")
    private String userName;

    @Schema(description = "昵称")
    @TableField("nick_name")
    private String nickName;

    @Schema(description = "邮箱")
    @TableField("email")
    private String email;

    @Schema(description = "密码")
    @TableField("password")
    private String password;

    @Schema(description = "账号")
    @TableField("acconut")
    private String acconut;

    @Schema(description = "微信OpenID")
    @TableField("wx_open_id")
    private String wxOpenId;

    @Schema(description = "用户头像URL")
    @TableField("avatar")
    private String avatar;

    @Schema(description = "性别")
    @TableField("gender")
    private Integer gender;

    @Schema(description = "生日")
    @TableField("birth")
    private Date birth;

    @Schema(description = "状态：0-禁用 1-启用")
    @TableField("status")
    private Integer status;

    @Schema(description = "注册日期")
    @TableField("register_time")
    private Date registerTime;

    @Schema(description = "上次登录时间")
    @TableField("last_login_time")
    private Date lastLoginTime;

    @Schema(description = "上次退出时间")
    @TableField("last_logout_time")
    private Date lastLogoutTime;

    @Schema(description = "上次修改时间")
    @TableField("last_update_time")
    private Date lastUpdateTime;

    @Schema(description = "日志篇数")
    @TableField("log_count")
    private Integer logCount;

    @Schema(description = "签到次数")
    @TableField("sign_in_count")
    private Integer signInCount;
}